package com.cv.platform.framework.web.config;

import com.cv.platform.framework.web.core.interceptor.UvInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 拦截器配置
 *
 * @author Charles_XDXD
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {
    
    @Resource
    private UvInterceptor uvInterceptor;
    
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(uvInterceptor)
                .addPathPatterns("/**");
    }
    
}
